const News = require('../model/news.model')
const {error} = require("../constant/err.type");
class NewsService {
    async createNews(title, content, userId) {
        // 写入数据库
        const res = await News.create({
            title,
            content,
            userId
        })
        return res.dataValues
    }
}
module.exports = new NewsService()
